package com.xzit.entity;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;

@Getter
@Setter
@Accessors(chain = true)
@Schema(name = "Channel", description = "栏目表")
public class Channel implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "栏目id")
    @TableId(value = "cid", type = IdType.AUTO)
    private Integer cid;

    @Schema(description = "栏目名称")
    @TableField("cname") // 明确指定数据库列名
    private String cname;

    @TableField("channel_desc") // 数据库中使用下划线命名
    @Schema(description = "栏目描述")
    private String channelDesc;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @Schema(description = "是否删除")
    @TableLogic(value = "0", delval = "1")
    private Boolean deleted;
}